using System;
using PhillyCodeCamp.Infrastructure;

namespace PhillyCodeCampSpecs.Helpers
{
    public class StubResolver : IDependencyResolver 
    {
        private readonly object _objectToReturn;

        public StubResolver(object objectToReturn)
        {
            _objectToReturn = objectToReturn;
        }

        public T Resolve<T>() 
        {
            return (T) _objectToReturn;
            
        }

        public void AddInstance(Type serviceType, object instance)
        {
            throw new NotImplementedException();
        }
    }
}